import Vue from 'vue'
import Vuerouter from 'vue-router'
import UserList from '../components/view/UserList.vue'
import useradd from '../components/view/useradd.vue'
import userSave from '../components/view/userSave.vue'
import pagaFrom from '../components/view/pagaFrom.vue'
import index from '../components/index.vue'
//  显示声明router路由
Vue.use(Vuerouter);

export default new Vuerouter({
	 mode:'history',
	 routes:[
		 {
			 path:'/',
			 name:'用户管理',
			 component:index,
			 redirect:'UserList',
			 // 嵌套路由
			 children:[
				 // 调用嵌套路由中的组件时  会默认先跳转到父路由中去 在父路由中显示该路由的内容
				 {
					path:'/UserList',
					name:'用户查询',
					 show:'true',
					component:UserList
				 },
				 {
					path:'/pagaTwo',
					name:'用户添加',
					 show:'true',
					component:useradd
				 },
				 {
					 path:'/userSave',
					 name:'用户修改',
					 show:'false',
					 component:userSave
				 }
			]
			 
		 }
	]
	 
})